package org.ee.doc.config;

import io.swagger.v3.oas.annotations.OpenAPIDefinition;
import io.swagger.v3.oas.annotations.enums.SecuritySchemeType;
import io.swagger.v3.oas.annotations.info.Contact;
import io.swagger.v3.oas.annotations.info.Info;
import io.swagger.v3.oas.annotations.info.License;
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
import io.swagger.v3.oas.annotations.security.SecurityScheme;
import io.swagger.v3.oas.annotations.servers.Server;
import org.springframework.context.annotation.Configuration;

/**
 *
 * @Author jokr
 * @Date 2025/8/29 18:00
 */
@Configuration
@OpenAPIDefinition(
        info = @Info(
                title = "ZEEBoot基础项目统一API 文档",
                version = "1.0",
                description = "所有模块共享文档配置",
                contact = @Contact(name = "jokr", email = "zlj51249@gmail.com"),
                license = @License(name = "Apache 2.0", url = "https://www.apache.org/licenses/LICENSE-2.0")
        ),
        servers = {
                @Server(url = "http://localhost:9020", description = "本地环境"),
                @Server(url = "https://api.example.com", description = "生产环境")
        },
        security = {
                @SecurityRequirement(name = "BearerAuth") // 注意这里引用
        }
)
@SecurityScheme(
        name = "BearerAuth",
        type = SecuritySchemeType.HTTP,
        scheme = "bearer",
        bearerFormat = "JWT"
)
public class SpringDocConfig {

}
